﻿
@{
    ViewBag.Title = "SPPZ";
    Layout = "~/Views/Shared/_LayoutForEUI.cshtml";
}
<table class="table table-celled">
    <thead>
        <tr>
            <td>审批流设置</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><input class="easyui-textbox" label="审批流等级"  labelposition="top" style="width:100%" id="SP_SPPZ_txtUName" value="3"  disabled="disabled"/></td>
        </tr>
        <tr>
            <td>
                <select id="SP_SPPZ_cmb_status1" class="easyui-combobox" labelposition="top" label="本部门审批" data-options="editable:false" name="SP_SPPZ_cmb_status1" style="width:100%;" panelHeight="auto">
                    @{
                        if (ViewBag.status1 == "1")
                        {
                            <option value="1" selected="selected">是</option>
                            <option value="0">否</option>
                        }
                        else
                        {
                            <option value="1" >是</option>
                            <option value="0" selected="selected">否</option>
                        }
                    }
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <select id="SP_SPPZ_cmb_status2" class="easyui-combobox" labelposition="top" label="档案归档部门审批" data-options="editable:false" name="SP_SPPZ_cmb_status2" style="width:100%;" panelHeight="auto">
                    @{
                        if (ViewBag.status2 == "1")
                        {
                            <option value="1" selected="selected">是</option>
                            <option value="0">否</option>
                        }
                        else
                        {
                            <option value="1">是</option>
                            <option value="0" selected="selected">否</option>
                        }
                    }
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <select id="SP_SPPZ_cmb_status3" class="easyui-combobox" labelposition="top" label="档案管理部门审批" data-options="editable:false" name="SP_SPPZ_cmb_status3" style="width:100%;" panelHeight="auto">
                    @{
                        if (ViewBag.status3 == "1")
                        {
                            <option value="1" selected="selected">是</option>
                            <option value="0">否</option>
                        }
                        else
                        {
                            <option value="1">是</option>
                            <option value="0" selected="selected">否</option>
                        }
                    }
                </select>
            </td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th>
                <a href="javascipt:void(0);" class="easyui-linkbutton button-blue pull-right" style="width:100px" data-options="iconCls:'icon-ok'" onclick="Add()">保存</a>
            </th>
        </tr>
    </tfoot>
</table>
<script>
    function Add() {

        var status1 = $('#SP_SPPZ_cmb_status1').datebox('getValue');
        var status2 = $('#SP_SPPZ_cmb_status2').datebox('getValue');
        var status3 = $('#SP_SPPZ_cmb_status3').datebox('getValue');
            $.ajax({
                url: '/SP/SaveSPPZ',
                dataType: 'text',
                type: 'post',
                data: { status: status1 + ',' + status2 + ',' + status3 },//string ip,string username,string pwd,string ou
                success: function (data) {
                    $.messager.alert('提示！', "设置成功", 'info');
                }
            });
    }
</script>
